<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts 雷达图示例</title>
    <!-- 引入 ECharts 文件 -->
    <script src="echarts.min.js"></script>
</head>
<body>
<!-- 准备用于显示图表的容器 -->
<div id="radarChart" style="width: 600px;height:400px;margin-left: 200px;"></div>
<script>


    var myChart = echarts.init(document.getElementById('radarChart'));




    var option;

    var indicatorArr = [
        { name: '分行A', max: 100 },
        { name: '分行B', max: 100 },
        { name: '分行C', max: 100 },
        { name: '分行D', max: 100 },
        { name: '分行E', max: 100 },
        { name: '分行F', max: 100 },
        { name: '分行F2', max: 100 },
        { name: '分行F3', max: 100 },
        { name: '分行F4', max: 100 },
        { name: '分行F5', max: 100 },
        { name: '分行F6', max: 100 },
        { name: '分行F7', max: 100 },
        { name: '分行F8', max: 100 },
    ];


    option = {
        title: {
            text: '百分比分布图'
        },
        legend: {
            data: ['户数百分比', '金额百分比']
        },

        radar: {
            shape: 'circle',
            indicator: indicatorArr
        },
        /*
        tooltip: {
            show: true,
            trigger: 'axis'
        },*/


        /*
        tooltip: {
            // 显示 tooltip
            show: true,
            // 自定义提示框内容
            formatter: function(params) {
                // params 是包含当前标签信息的对象
                let list = params.value;
                let temp = "";
                if(list!=null && list.length>0){
                    for(let n=0;n<list.length;n++){
                        temp =  temp + '<br/>' + indicatorArr[n].name + "：" + list[n];
                    }
                }
                return params.name + temp;
            }
        },
         */

        series: [
            {
                name: '百分比分布图',
                type: 'radar',
                data: [
                    {
                        value: [42, 30, 20, 35, 50, 18,42, 30, 20, 35, 50, 18,55],
                        name: '户数百分比'
                    },
                    {
                        value: [50, 14, 28, 26, 42, 21,50, 14, 28, 26, 42, 21,66],
                        name: '金额百分比'
                    }
                ]
            }
        ]
    };

   myChart.setOption(option);


</script>
</body>
</html>